package com.example.config.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author yuisama
 * @date 2023/02/01 16:28
 **/
@Slf4j
@Component
public class ReadFromConfig2 {
    public ReadFromConfig2(
            //一定是导 Spring下的Value,括号里面写需要的项
            @Value("${logging.file.name}") String loggingFileName,
            @Value("${xiaojing.name}") String name,
            @Value("${xiaojing.age}") String age){
        log.info("读取到的　　logging.file.name =" +  loggingFileName);
        log.info("读取到的 menmen.name ="+ name);
        log.info("读取到的 menmen.age ="+ age);


    }
}

